home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
CIncludes
/
ToolUtils.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-05-01
|
3KB
|
148 lines
/*
File: ToolUtils.h
Contains: Toolbox Utilities Interfaces.
Version: Technology: System 7.5
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
*/
#ifndef __TOOLUTILS__
#define __TOOLUTILS__
#ifndef __TYPES__
#include <Types.h>
#endif
#ifndef __OSUTILS__
#include <OSUtils.h>
#endif
#if OLDROUTINELOCATIONS
#ifndef __FIXMATH__
#include <FixMath.h>
#endif
#ifndef __ICONS__
#include <Icons.h>
#endif
#ifndef __QUICKDRAW__
#include <Quickdraw.h>
#endif
#ifndef __TEXTUTILS__
#include <TextUtils.h>
#endif
/* !OLDROUTINELOCATIONS*/
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
/*
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Note:
The following routines that used to be in this header file, have moved to
more appropriate headers. If OLDROUTINELOCATIONS is 0, then you will have
to include the headers below to use the following functions.
FixMath.h: FixMul
FixRatio
FixRound
Icons.h: GetIcon
PlotIcon
Quickdraw.h: AngleFromSlope
DeltaPoint
GetCursor
GetIndPattern
GetPattern
GetPicture
PackBits
ScreenRes
ShieldCursor
SlopeFromAngle
UnpackBits
TextUtils.h: Munger
GetIndString
GetString
NewString
SetString
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
/* Used only in the LongMul function.*/
struct Int64Bit {
SInt32 hiLong;
UInt32 loLong;
};
typedef struct Int64Bit Int64Bit;
#if FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE
extern pascal Boolean BitTst(const void *bytePtr, long bitNum)
ONEWORDINLINE(0xA85D);
extern pascal void BitSet(void *bytePtr, long bitNum)
ONEWORDINLINE(0xA85E);
extern pascal void BitClr(void *bytePtr, long bitNum)
ONEWORDINLINE(0xA85F);
extern pascal long BitAnd(long value1, long value2)
ONEWORDINLINE(0xA858);
extern pascal long BitOr(long value1, long value2)
ONEWORDINLINE(0xA85B);
extern pascal long BitXor(long value1, long value2)
ONEWORDINLINE(0xA859);
extern pascal long BitNot(long value)
ONEWORDINLINE(0xA85A);
extern pascal long BitShift(long value, short count)
ONEWORDINLINE(0xA85C);
#if GENERATING68K
extern pascal void LongMul(long a, long b, Int64Bit *result)
ONEWORDINLINE(0xA867);
#endif
#endif
#if !GENERATING68K
#define LongMul(a, b, result) ((void) WideMultiply((a), (b), (wide*)(result)))
#endif
#define HiWord(x) ((short)((long)(x) >> 16))
#define LoWord(x) ((short)(x))
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import off
#endif
#ifdef __cplusplus
}
#endif
#endif /* __TOOLUTILS__ */